home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / aanexa1a / form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  1998-10-07  |  2.6 KB  |  78 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Pop-up Menu"
  5.    ClientHeight    =   4350
  6.    ClientLeft      =   150
  7.    ClientTop       =   675
  8.    ClientWidth     =   6555
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   4350
  13.    ScaleWidth      =   6555
  14.    ShowInTaskbar   =   0   'False
  15.    StartUpPosition =   3  'Windows Default
  16.    Begin VB.Menu mnuPopUp 
  17.       Caption         =   "Pop-Up"
  18.       Begin VB.Menu mnuPopUp_WebPage 
  19.          Caption         =   "Our Web Page"
  20.       End
  21.       Begin VB.Menu mnuPopUp_Somethingelse 
  22.          Caption         =   "Something else"
  23.       End
  24.       Begin VB.Menu mnuPopUp_Ugly 
  25.          Caption         =   "Pictures of my mom"
  26.       End
  27.       Begin VB.Menu mnuPopUp_About 
  28.          Caption         =   "About"
  29.       End
  30.       Begin VB.Menu mnuPopUp_Exit 
  31.          Caption         =   "Exit"
  32.       End
  33.    End
  34. Attribute VB_Name = "Form1"
  35. Attribute VB_GlobalNameSpace = False
  36. Attribute VB_Creatable = False
  37. Attribute VB_PredeclaredId = True
  38. Attribute VB_Exposed = False
  39. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  40. 'Pop-Up menu example
  41. 'Dustin Davis
  42. 'Bootleg Software Inc.
  43. 'Http://www.warpnet.org/bsi
  44. 'I hope this helps you! If not, well, I dunno
  45. 'Please feel free to e-mail me for questions. I get lonley sometimes!!
  46. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  47. Private Sub Form_Load()
  48. mnuPopUp.Visible = False 'you can have this on if you want
  49. End Sub
  50. Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  51. 'this is the place to control the buttons
  52. If Button = 2 Then 'if they right click, 1=left, 2=right
  53.     Form1.PopupMenu mnuPopUp 'show popup menu
  54. Else 'else if they clicked the left button
  55.     DoEvents
  56. End If
  57. End Sub
  58. Private Sub mnuPopUp_About_Click()
  59. 'and still, they keep coming!
  60. MsgBox "Dustin Davis" & vbCrLf & "Bootleg Software Inc." & vbCrLf & "Planet Source Code Rules!"
  61. End Sub
  62. Private Sub mnuPopUp_Exit_Click()
  63. 'this is one of the menu functions. You can add more
  64. Unload Me
  65. End Sub
  66. Private Sub mnuPopUp_Somethingelse_Click()
  67. 'yet another menu function
  68. MsgBox "Alot more junk!"
  69. End Sub
  70. Private Sub mnuPopUp_Ugly_Click()
  71. 'still, another function of the menu!
  72. MsgBox "HEY! Are you some kind of sick wierd`o? Why would you wanna see my mom naked?!"
  73. End Sub
  74. Private Sub mnuPopUp_WebPage_Click()
  75. 'another menu function
  76. MsgBox "This is where you add stuff!"
  77. End Sub
  78.